home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-08-30 | 1.5 KB | 52 lines | [TEXT/GEOL] |
- Item 4722459 30-Aug-89 03:33
-
- From: AU0008 Kopfwerk EDV SW Entwicklung
-
- To: ALGER Alger, Jeff,VCA
- MACAPP.TECH$ MACAPP Tech
-
- Sub: Re:Re:Memory Management
-
- Jeff,
-
- thank you for reply to my memory management problems. I did the implementation
- how you suggested. I added in implementation part of UInspector (file:
- …MacApp:Libraries:UInspector.inc1.p) EachObjectForClass and
- ComputeSizeForClass. Then I modified the Interface part of UInspector (file:
- …MacApp:Interfaces:PInterfaces:UInspector.p) to have ComputeSizeForClass
- public. In my program there is a procedure WriteSizeOfObject which prints the
- size for every class and the sum of these in the transcript window.
-
- {$IFC qDebug}
- PROCEDURE WriteSizeOfObjects;
- VAR
- sumSize: LONGINT;
-
- PROCEDURE WriteSizeOfClass (theClass: ObjClassID);
- VAR
- theSize, howMany: LONGINT;
- theName : MAName;
-
- BEGIN
- theSize:= ComputeSizeForClass (theClass, howMany);
- sumSize:= sumSize + theSize;
- if (theSize <> 0) OR (howMany <> 0) THEN
- BEGIN
- GetClassNameFromID (theClass, theName);
- writeln ('Size: ',theSize:6,' # = ', howMany:2,' Class: ',theNam
- END;
- END;
-
- BEGIN
- sumSize:= 0;
- EachClassDo (WriteSizeOfClass);
- writeln ('### size of ALL objects: ',sumSize);
- writeln;
- END;
- {$ENDC}
-
- It works fine and is exactly what I need.
-
- Tommi.
-
-